﻿using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Text;
using OpenAuth.Repository.Domain;
using OpenAuth.Repository.Interface;

namespace OpenAuth.App
{
    /// <summary>
    /// 查询外部订单
    /// </summary>
    public class CGGYW007App : ApiBaseApp<CGGYW007>
    {
        public CGGYW007App(IApiRepository<CGGYW007> repository) : base(repository)
        {
        }
        /// <summary>
        /// 查询外部订单
        /// </summary>
        /// <param name="orderid"></param>
        /// <returns></returns>
        public IEnumerable<CGGYW007Response> QueryOutSideOrder(string orderid)
        {
            List<SqlParameter> param = new List<SqlParameter>();
            param.Add(new SqlParameter("@Orderid", orderid));
            param.Add(new SqlParameter("@Zflb", 1));
            param.Add(new SqlParameter("@Czyh", "hf001"));
            var result = Query<CGGYW007Response>("exec usp_web_webtrans_CGGYW007 @orderid=@Orderid,@zflb=@Zflb,@czyh=@Czyh", param);
            return result;
        }
    }
}
